package com.yc.sole.financial.request;

import com.yc.sole.framework.validate.SaveGroup;
import com.yc.sole.framework.validate.UpdateGroup;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Set;

/**
 * Request对象
 *
 * @author yizuomin
 * @date 2024-01-23
 **/
@Data
public class PieceRateWageDetailReq implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @NotNull(groups = UpdateGroup.class)
    private Long id;
    /**
     * 日期
     */
    @Length(max = 10, groups = {SaveGroup.class, UpdateGroup.class})
    @NotBlank(groups = {SaveGroup.class, UpdateGroup.class})
    private String date;
    /**
     * 员工id
     */
    @NotEmpty(groups = {SaveGroup.class})
    private Set<Long> employeeIds;
    /**
     * 工序id
     */
    @NotNull(groups = {SaveGroup.class, UpdateGroup.class})
    private Long processId;
    /**
     * 班组id
     */
    @NotNull(groups = {SaveGroup.class, UpdateGroup.class})
    private Long shiftId;
    /**
     * 补贴
     */
    @DecimalMin(value = "0.00", groups = {SaveGroup.class, UpdateGroup.class})
    private BigDecimal subsidy;
}
